package com.qwc.blog.entity.vo.tag;

import com.qwc.blog.entity.Tag;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author qwc
 * @Date 2021/10/31 19:45
 */
@Data
public class AddTagDto {
    @NotBlank(message = "标签名不能为空")
    private String name;

    public Tag createTag() {
        Tag tag = new Tag();
        tag.setName(name);
        return tag;
    }
}
